package com.zy.domain;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 系统用户
 * @TableName sys_user
 */
@ApiModel(value = "com-zy-domain-SysUser")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName(value ="sys_user")
public class SysUser implements Serializable {
    /**
     * 
     */
    @TableId(value = "user_id", type = IdType.AUTO)
    private Long userId;

    /**
     * 用户名
     */
    @TableField(value = "username")
    private String username;

    /**
     * 密码
     */
    @TableField(value = "password", updateStrategy = FieldStrategy.NOT_EMPTY) //局部字段更新策略 not null and !=""
    private String password;

    /**
     * 邮箱
     */
    @TableField(value = "email")
    private String email;

    /**
     * 手机号
     */
    @TableField(value = "mobile")
    private String mobile;

    /**
     * 状态  0：禁用   1：正常
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 创建者ID
     */
    @TableField(value = "create_user_id")
    private Long createUserId;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 用户所在的商城Id
     */
    @TableField(value = "shop_id")
    private Long shopId;

    ////////////////// 新增管理员 ///////////////////
    @TableField(exist = false) //不参与数据表字段的映射
    @ApiModelProperty("角色id集合")
    private List<Long> roleIdList;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

}